package frontend.parser;

import frontend.lexer.Token;
import frontend.parser.syntaxtree.SyntaxNode;

/**
 * 包含下一个token和解析生成的AST子树
 *
 * @author 杨凯伟
 * @date 2024/10/13
 */
class ParseResult {
    private final Token nextToken;
    private final SyntaxNode subtree;

    public ParseResult(Token nextToken, SyntaxNode subtree) {
        this.nextToken = nextToken;
        this.subtree = subtree;
    }

    public Token getNextToken() {
        return nextToken;
    }

    public SyntaxNode getSubtree() {
        return subtree;
    }
}
